-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BLUE-271 fix: applyTimestamp added to processed tx #76
Conversation
1cf2262
to
99b835d
Compare
src/Data/Data.ts
Outdated
// Send ehlo event right after connect: | ||
socketClient.emit('ARCHIVER_PUBLIC_KEY', config.ARCHIVER_PUBLIC_KEY) | ||
archiverKeyisEmitted = true | ||
Logger.mainLogger.debug(`✅ New Socket Connection to consensus node ${node.ip}:${node.port} is made`) |
Check warning
Code scanning / CodeQL
Log injection Medium
user-provided value
99b835d
to
8d8b671
Compare
@@ -1157,7 +1157,7 @@ export const storeAccountData = async (restoreData: StoreAccountParam = {}): Pro | |||
txId: receipt.data.txId || receipt.txId, | |||
cycle: receipt.cycleNumber, | |||
txTimestamp: receipt.timestamp, | |||
txApplyTimestamp: null, | |||
applyTimestamp: receipt.timestamp, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jairajdev what's the difference b/w applyTimestamp and txTimestamp ? both are receiving the same value ..i.e. receipt.timestamp and also what's the reasoning behind renaming applyTimestamp from txApplyTimestamp? I hope it won't break the other flow! in archive-server
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
txTimestamp is the timestamp set before putting the tx in the tx queue
txApplyTimestamp is the timestamp when the tx is processed/consensused
but in this storeAccountData
function which was used to restore the tx receipt from the first node in the network ( this feature is not used anymore ), since there is no way we can calculate the txApplyTimestamp, we have to set the txTimestamp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but what's the need to have 2 fields receiving the same value.. if applyTimestamp value can't be correctly calculated and inserted, why shouldn't it be removed ? what's the purpose of having this extra field then ? @jairajdev
Summary
applyTimestamp
was not set correctly in case of processed transaction logic, this PR fixes that.